﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace Spider
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application. 
        /// </summary>
        [STAThread]
        static void Main()
        { 
            //Application.ApplicationExit += new EventHandler(Application_ApplicationExit);
            //CustomExceptionHandler customexception = new CustomExceptionHandler();
            //Application.Run(new FrmMain());
            FrmLogin login = new FrmLogin();
            login.ShowDialog();
            if (login.DialogResult.Equals(DialogResult.OK))
            {
                login.Dispose();
                login = null;
                Application.Run(new FrmMain());
            }
        }

        static void Application_ApplicationExit(object sender, EventArgs e)
        {
            System.Environment.Exit(0);
            string exit = "程序退出了" + DateTime.Now.ToString();
            Log.LogSpecial(LogDetail.LogType.GoloalRecord, exit);
            MessageBox.Show(exit);
        }
    }
}